package com.pingba.dao.msg;

import com.pingba.dao.BaseDao;
import com.pingba.entity.User;
import com.pingba.entity.msg.MsgSend;
import com.pingba.entity.msg.MsgSubscribe;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by Administrator on 2015/11/28 0028.
 */
@Repository
public interface MsgSubscribeDao extends BaseDao<MsgSubscribe, Long> {
    List<MsgSend> mySubscribes(User user);
    void setDeleted(MsgSubscribe subscribe);
    void unSubscribeOne(long userId, long msgSendId);
    List<MsgSubscribe> isSubsribed(long userId, long msgSendId);

    /**
     * 删除一条msgsend对应的收藏
     * @param msgSendId 消息id
     */
    void deleteSubscribeOfSend(long msgSendId);
}
